_reqparam 1nosc1N Would you like to import settings from a previous copy of mIRC? (P&P, another script, or plain mIRC)
}
1proceed
}
1nosc1 {
if (Y !isin $1) 1proceed
.timer -m 1 10 1nosc1b
}
1nosc1b {
set %.ini $dir="Select MIRC.INI to import" c:\mirc.ini
if ((%.ini == $null) || (%.ini == $mircdirmirc.ini)) 1proceed
1mirc %.ini
}
1proceed {
if ($line(@Mirc,0) > 0) {
iline @Mirc 1 Previous copies of mIRC were found.
iline @Mirc 2 Double-click on an .INI to import the settings
iline @Mirc 3 - OR -
iline @Mirc 4 Double-click HERE to not import any settings
iline @Mirc 5 (copies of mIRC with scripts CAN be imported)
iline @Mirc 6 $chr(160)
window -r @Mirc
halt
}
set %_new $_mircdir $+ mirc.ini
_reqparam 1cm1 Enter your preferred nickname:
}
1cm1 _writeini %_new mirc nick $1 | _reqparam 1cm2 Enter your alternate nickname:
1cm2 _writeini %_new mirc anick $1 | _reqparam 1cm3anon@peace.com Enter the e-mail address to show in mIRC: (does not need to be your real e-mail)
1cm3 _writeini %_new mirc email $1 | _reqparam 1cm4PeaceandProtectionv3.20 Enter your "real name" or "quote" to show in your IRC info: (can be any info you desire)
1cm4 _writeini %_new mirc user $1- | _reqparam 1cm5peace Enter your "identd", the portion of your IRC or e-mail address to the left of the @ sign:
if (%.ln == 4) { window -c @Mirc | 1proceed | halt }
if (%.ln < 7) halt
set %.ini $sline(@Mirc,1)
}
else set %.ini $1-
if ($chr(32) isin %.ini) set %.ini " $+ %.ini $+ "
set %.new $_mircdir $+ mirc.ini
set %.ln 1
set %.max $lines(%.ini)
unset %.gr
:loop
set %.get $read -nl [ $+ [ %.ln ] ] %.ini
if ($left(%.get,1) == $chr(91)) {
if (%.get !isin [rgb][autoop][protect][ignore][perform][logging][windows][timestamp][wizard][fileserver][fonts][ontop][channels][dccserver][channelfiles][channelslist][extensions][Finger][ident][socks][DCCNicks][local][text][mirc][dirs][notify][colours][options]) unset %.gr
else set %.gr $remove($remove(%.get,$chr(91)),$chr(93))
}
elseif ((%.gr != $null) && (%.get != $null)) {
set %.opt $gettok(%.get,1,61)
set %.wr $gettok(%.get,2-,61)
if (%.gr == options) {
if (%.opt == n1) set %.wr $gettok(%.wr,1-19,44) $+ ,0, $+ $gettok(%.wr,21-,44)
if (%.opt == n2) set %.wr $gettok(%.wr,1-15,44) $+ ,1, $+ $gettok(%.wr,17-,44)
if (%.opt == n3) set %.wr $gettok(%.wr,1-18,44) $+ ,0,1,0, $+ $gettok(%.wr,22-23,44) $+ ,0, $gettok(%.wr,25-,44)
if (%.opt == n5) set %.wr $gettok(%.wr,1-13,44) $+ ,5, $+ $gettok(%.wr,15-26,44) $+ ,0
}
if (%.opt != quit) _writeini %.new %.gr %.opt %.wr
}
if ($_vi(.ln) <= %.max) goto loop
set %.logs $readini %.new dirs logdir
if (: isin %.logs) _writeini %.new dirs logdir logs\
1cont
}
1cont {
window -c @Mirc
if ($line(@P&P,0) > 0) {
iline @P&P 1 Previous copies of Peace and Protection were found.
iline @P&P 2 Double-click on an .INI to import the settings
iline @P&P 3 - OR -
iline @P&P 4 Double-click HERE to not import any settings
iline @P&P 5 (any version 2.60 and up can be imported)
iline @P&P 6 $chr(160)
window -r @P&P
halt
}
elseif ((%pp.setuptype == 13) && ($1 != !)) {
_reqparam 2nosc2N Would you like to import settings from another copy of Peace and Protection? (2.60, 3.00, 3.14, or 3.20)
}
window -c @P&P
_reqparam 1cp0 Now it is time to ask you a few configuration questions. If you do not understand a question, simply hit Enter to accept the default value. Press 1Enter now to continue.
}
2nosc2 {
if (Y !isin $1) 1cont !
.timer -m 1 10 2nosc2c
}
2nosc2c {
set %.ini $dir="Select CONFIG.INI to import (from P&P)" $mircdirp&p\config.ini
if ((%.ini == $null) || (%.ini == $mircdirpp300\config.ini)) 1cont !
_reqparam 1cp1Seperate Would you like ping replies to display to your active window, status window, or a seperate @Ping window? (Type 1active, 1status, or 1seperate and press Enter)
}
1cp1 {
if ($left($1,1) == a) set %ping.route -ai2 | elseif ($left($1,2) == st) set %ping.route -si2 | else set %ping.route @Ping
_reqparam 1cp2Seperate Would you like whois replies to display to your active window, status window, or a seperate @Whois window? (Type 1active, 1status, or 1seperate and press Enter)
}
1cp2 {
if ($left($1,1) == a) set %whois.route -ai2 | elseif ($left($1,2) == st) set %whois.route -si2 | else set %whois.route @Whois
_reqparam 1cp3Active Would you like CTCPs and other events to display to your active window or status window? (Type 1active or 1status and press Enter)
}
1cp3 {
if ($left($1,1) == s) set %event.route -si2 | else set %event.route -ai2
_reqparam 1cp4N Show address (user@host) of users who send you CTCPs? (Type 1Y or 1N and press Enter)
}
1cp4 {
set %+disp.address $_o2tf($1)
_reqparam 1cp515 Automatically set yourself as away after how many minutes? (Use 0 to disable)
}
1cp5 {
if ($1 isnum) set %autoaway.idle $calc($1 * 60)
_reqparam 1cp6Status Would you like notify events (users on your notify list joining and leaving IRC) to display to your active window, status window, or nowhere? (Type 1active, 1status, or 1none and press Enter)
}
1cp6 {
if ($left($1,1) == a) set %notify.route -ai2 | elseif ($left($1,2) == n) set %notify.route none | else set %notify.route -si2
1ca1
}
1ca1 {
_reqparam 1ca2N If a flood is detected, change to a random nickname? (Type 1Y or 1N and press Enter)
}
1ca2 {
set %+nickchange.flood $_o2tf($1)
set %+cf9.nickchange $_o2tf($1)
_reqparam 1ca3N Automatically ignore DCC chats and sends from users not in your notify list or userlist? (Type 1Y or 1N and press Enter)
}
1ca3 {
if ($_o2tf($1)) {
set %accept.chat Notice
set %accept.send Notice
set %accept.chataway Notice
set %accept.sendaway Notice
}
_reqparam 1ca4Y Automatically accept DCC chats and sends from users in your notify list or userlist? (Type 1Y or 1N and press Enter)
}
1ca4 {
if ($_o2tf($1)) {
set %accept.knownchat Auto
set %accept.knownsend Auto
set %accept.knownchataway Auto
set %accept.knownsendaway Auto
}
_reqparam 1ca5Y Color nicknames in channel nicklist different colors depending on whether they are in your userlist, notify list, ircops, etc.? This option may not be suitable for slow computers. (Type 1Y or 1N and press Enter)
}
1ca5 {
set %+nickcolors $_o2tf($1)
_reqparam 1ca6N Attempt to automatically request sound files that other people play that you do not own? (Type 1Y or 1N and press Enter)
}
1ca6 {
_writeini %_new Sound AutoGet $_o2tf($1)
_reqparam 1ca7N When a user joins, if you've seen them get banned before or kicked at least twice before, display a note to yourself regarding this? (Type 1Y or 1N and press Enter)
}
1ca7 {
set %+joinstat $_o2tf($1)
set %+kickstat $_o2tf($1)
_reqparam 1ca8N Would you like to see IRCop wallops by default? (Type 1Y or 1N and press Enter)
}
1ca8 {
set %+mode.w $_o2tf($1)
_reqparam 1ca9Y Would you like to see relevant server notices by default? (Type 1Y or 1N and press Enter)
}
1ca9 {
set %+mode.s $_o2tf($1)
_reqparam 1ca10Query When you double-click on a user's nickname in a channel, would you like a private query window to be opened, or would you like to whois the user? (Type 1Query or 1Whois and press Enter)
}
1ca10 {
if (w isin $1) set %dclick.nickcmd whois | else set %dclick.nickcmd query
_reqparam 1ca11Central When you double-click in a channel, would you like to open mIRC's default "channel central", view/edit just the banlist, or simply edit the topic? (Type 1Central, 1Banlist, or 1Topic and press Enter)
}
1ca11 {
if (b isin $1) set %dclick.chancmd ban | elseif (c isin $1) set %dclick.chancmd channel | else set %dclick.chancmd etopic
_reqparam 1ca12N Record information on when you "last saw" users on your notify/userlist, so you can recall this information with /seen? (may cause delays on channel parts) (Type 1Y or 1N and press Enter)
}
1ca12 {
if ($_o2tf($1)) .enable #lastseen | else .disable #lastseen
_reqparam 1ca13Simple Would you like pressing F6 to bring up a simple color selection menu or a set of complex color formatting menus? (Type 1Simple or 1Complex and press Enter)
}
1ca13 {
if (c isin $1) set %+f6.simple.color $false | else set %+f6.simple.color $true
_reqparam 1ca14Back Would you like /b to stand for "/back" or "/ban"? (Type 1Back or 1Ban and press Enter)
}
1ca14 {
if (n isin $1) set %+aliasb.to.ban $true | else set %+aliasb.to.ban $false
1next
}
1pp {
if ($1 == $null) {
set %.ln $sline(@P&P,1).ln
if (%.ln == 4) { window -c @P&P | 1cont | halt }
if (%.ln < 7) halt
set %.ini $sline(@P&P,1)
}
else set %.ini $1-
if ($chr(32) isin %.ini) set %.ini " $+ %.ini $+ "
if (%.is != $null) _writeini %.new Sound LeechCmd %.is
set %.is $read -ns%leech.show %.ini
_writeini %.new Sound LeechShow $_o2tf(%.is)
set %.is $read -ns%leech.types %.ini
if (%.is != $null) _writeini %.new Sound LeechTypes %.is
set %.is $read -ns%leech.other.dir %.ini
if (%.is != $null) _writeini %.new Sound OtherDir %.is
set %.is $read -ns%maxsend.leech %.ini
if (%.is != $null) _writeini %.new Sound LeechMax %.is
set %autoaway.idle $read -ns%aidle.sec %.ini
set %.is $read -ns%aidle.quiet %.ini
set %+autoaway.quiet $_o2tf(%.is)
set %.is $read -ns%accept.sound.away %.ini
set %+accept.sounds.away $_o2tf(%.is)
set %.is $read -ns%accept.ebeeps.away %.ini
set %+accept.ebeeps.away $_o2tf(%.is)
set %awaywords $read -ns%awaywords %.ini
set %.is $read -ns%disp.addr %.ini
set %+disp.address $_o2tf(%.is)
set %.is $read -ns%kickon.ban %.ini
set %+filterkick.bans $_o2tf(%.is)
set %xw.use $read -ns%use.xw %.ini
set %.is $read -ns%must.xw.login %.ini
set %+xw.must.login $_o2tf(%.is)
set %.is $read -ns%event.route %.ini
if (s isin %.is) set %event.route -si2
else set %event.route -ai2
set %.is $read -ns%time.stamp %.ini
set %+time.stamp $_o2tf(%.is)
set %.is $read -ns%shownotify %.ini
if (s isin %.is) set %notify.route -si2
elseif (a isin %.is) set %notify.route -ai2
else set %notify.route none
set %.is $read -ns%preply.window %.ini
if (@ isin %.is) set %ping.route @Ping
elseif (s isin ^%.is) set %ping.route -si2
else set %ping.route -ai2
set %.is $read -ns%whois.route %.ini
if (@ isin %.is) set %whois.route @Whois
elseif (s isin ^%.is) set %whois.route -si2
else set %whois.route -ai2
set %.is $read -ns%show.clone.scan %.ini
set %+clonescan.hide $_not($_o2tf(%.is))
set %.is $read -ns%show.black.list.scan %.ini
set %+blackscan.hide $_not($_o2tf(%.is))
set %.is $read -ns%accept.chat %.ini
set %accept.chat %.is
set %accept.knownchat %.is
set %accept.chataway %.is
set %accept.knownchataway %.is
set %.is $read -ns%accept.send %.ini
set %accept.send %.is
set %accept.knownsend %.is
set %accept.sendaway %.is
set %accept.knownsendaway %.is
set %.is $read -ns%verify.invites %.ini
set %+verify.invites $_o2tf(%.is)
set %.is $read -ns%imposter.alert %.ini
set %+imposter.alert $_o2tf(%.is)
set %.is $read -ns%unsolicited.notice %.ini
set %+unsolicited.notice $_o2tf(%.is)
set %max.clone $read -ns%max.clone %.ini
set %warn.clone $read -ns%warn.clone %.ini
set %strictMode $read -ns%enforce.mode %.ini
set %.is $read -ns%ok.chan.sound.flood %.ini
set %+sound.flood.ok $_o2tf(%.is)
set %.is $read -ns%self.lag.alert %.ini
if ((15 isin %.is) && (40 isin %.is)) { set %self.lag.warn1 15 | set %self.lag.warn2 40 }
elseif (15 isin %.is) { set %self.lag.warn1 15 | set %self.lag.warn2 0 }
elseif (40 isin %.is) { set %self.lag.warn1 0 | set %self.lag.warn2 40 }
else { set %self.lag.warn1 0 | set %self.lag.warn2 0 }
set %whois.onjoin $read -ns%whois.on.join %.ini
set %.is $read -ns%showtitle %.ini
if (n isin %.is) set %show.title Nickname
else set %show.title Server
set %nick.complete.chars $read -ns%nickc.chars %.ini
window -c @P&P
set %_new $_mircdir $+ pp300\config.ini
_reqparam 1ca1 Now it is time to ask you a few configuration questions. If you do not understand a question, simply hit Enter to accept the default value. Press 1Enter now to continue.
}
else import300 %_req.col x %pp.first %pp.setuptype
}
import300 {
.window -h @Filez
.aline @Filez %.ini
.aline @Filez %.new
.remove %.new
.copy %.ini %.new
.writeini %.new CTCP Script Peace and Protection &ver& by misspai + &addons& (http://pairc.com/pnp/)
iline @Player 1 The following MP2/3 players were found.
iline @Player 2 Peace and Protection needs to know which player to use.
iline @Player 3 Double-click on a player to select it.
iline @Player 4 - OR -
iline @Player 5 Double-click HERE for none.
iline @Player 6 $chr(160)
window -r @Player
halt
}
1setplayer
}
1player {
set %.ln $sline(@Player,1).ln
if (%.ln == 5) { 1setplayer | halt }
if (%.ln < 7) halt
1setplayer $sline(@Player,1)
}
1setplayer {
window -c @Player
set %_new $_mircdir $+ pp300\config.ini
set %_mini $_mircdir $+ mirc.ini
_writeini %_new Sound MP2Player $1-
_writeini %_new Sound MP3Player $1-
1domp
}
1domp {
if ($line(@MPDir,0) > 0) {
iline @MPDir 1 The following directories containing MP2/3 files were found.
iline @MPDir 2 Peace and Protection needs to know where to find your MP2/3 files.
iline @MPDir 3 Directories marked with [X] will be included in P&P's list.
iline @MPDir 4 Directories marked with [á] will not.
iline @MPDir 5 Double-click on a directory to toggle it.
iline @MPDir 6 - THEN -
iline @MPDir 7 Double-click HERE when you're finished.
iline @MPDir 8 $chr(160)
window -r @MPDir
halt
}
1setmp
}
1mp {
set %.ln $sline(@MPDir,1).ln
if (%.ln == 7) {
set %.ln 8
unset %.fnd
:loop
set %.is $line(@MPDir,%.ln)
if (%.is == $null) { if (%.fnd == $null) 1setmp | else 1setmp $_rchop(1,%.fnd) | halt }
if ($gettok(%.is,1,32) == [X]) set %.fnd %.fnd $+ ; $+ $gettok(%.is,2-,32)
inc %.ln | goto loop
}
if (%.ln < 9) halt
set %.is $sline(@MPDir,1)
if ($gettok(%.is,1,32) == [X]) rline @MPDir %.ln [á] $gettok(%.is,2-,32)
else rline @MPDir %.ln [X] $gettok(%.is,2-,32)
}
1setmp {
window -c @MPDir
_writeini %_new Sound MPDir $1-
if ($line(@MidDir,0) > 0) {
iline @MidDir 1 The following directories containing Midi files were found.
iline @MidDir 2 Peace and Protection needs to know where to find your Midi files.
iline @MidDir 3 Directories marked with [X] will be included in P&P's list.
iline @MidDir 4 Directories marked with [á] will not.
iline @MidDir 5 Double-click on a directory to toggle it.
iline @MidDir 6 - THEN -
iline @MidDir 7 Double-click HERE when you're finished.
iline @MidDir 8 $chr(160)
aline @MidDir [á] $mircdirsounds\
window -r @MidDir
halt
}
1setmid
}
1mid {
set %.ln $sline(@MidDir,1).ln
if (%.ln == 7) {
set %.ln 8
unset %.fnd
:loop
set %.is $line(@MidDir,%.ln)
if (%.is == $null) { if (%.fnd == $null) 1setmid | else 1setmid $_rchop(1,%.fnd) | halt }
if ($gettok(%.is,1,32) == [X]) set %.fnd %.fnd $+ ; $+ $gettok(%.is,2-,32)
inc %.ln | goto loop
}
if (%.ln < 9) halt
set %.is $sline(@MidDir,1)
if ($gettok(%.is,1,32) == [X]) rline @MidDir %.ln [á] $gettok(%.is,2-,32)
else rline @MidDir %.ln [X] $gettok(%.is,2-,32)
}
1setmid {
window -c @MidDir
set %.1st $gettok($1-,1,59)
set %.rest $gettok($1-,2-,59)
_writeini %_mini dirs midis %.1st
_writeini %_new Sound MoreMidiDir %.rest
if ($line(@WavDir,0) > 0) {
iline @WavDir 1 The following directories containing Wav files were found.
iline @WavDir 2 Peace and Protection needs to know where to find your Wav files.
iline @WavDir 3 Directories marked with [X] will be included in P&P's list.
iline @WavDir 4 Directories marked with [á] will not.
iline @WavDir 5 Double-click on a directory to toggle it.
iline @WavDir 6 - THEN -
iline @WavDir 7 Double-click HERE when you're finished.
iline @WavDir 8 $chr(160)
aline @WavDir [á] $mircdirsounds\
window -r @WavDir
halt
}
1setwav
}
1wav {
set %.ln $sline(@WavDir,1).ln
if (%.ln == 7) {
set %.ln 8
unset %.fnd
:loop
set %.is $line(@WavDir,%.ln)
if (%.is == $null) { if (%.fnd == $null) 1setwav | else 1setwav $_rchop(1,%.fnd) | halt }
if ($gettok(%.is,1,32) == [X]) set %.fnd %.fnd $+ ; $+ $gettok(%.is,2-,32)
inc %.ln | goto loop
}
if (%.ln < 9) halt
set %.is $sline(@WavDir,1)
if ($gettok(%.is,1,32) == [X]) rline @WavDir %.ln [á] $gettok(%.is,2-,32)
else rline @WavDir %.ln [X] $gettok(%.is,2-,32)
}
1setwav {
window -c @WavDir
set %.1st $gettok($1-,1,59)
set %.rest $gettok($1-,2-,59)
_writeini %_mini dirs waves %.1st
_writeini %_new Sound MoreWaveDir %.rest
unset %pp.setuptype
set %pp.first once
unset %pp.addon %pp.addon.ids %addon.*
flushini variable.mrc
flushini config.ini
flushini mirc.ini
if ($bits == 16) set %.exe mirc.exe
else set %.exe mirc32.exe
if ($exists(peacepro.doc)) .remove peacepro.doc
set %.old $mircdirp&p\s-main.mrc
if ($exists(%.old)) _reqparam 1fin First time configuration is complete. Once in Peace and Protection type /config or browse the P&P Tools menu for more options. You can delete the $mircdirP&P\ subdirectory- It was used in 2.60 and is no longer needed. Press 1Enter now to start Peace and Protection.
else _reqparam 1fin First time configuration is complete. Once in Peace and Protection you can type /config for more detailed configuration, or browse the P&P Tools menu (especially under "Script") for more options. Press 1Enter now to start Peace and Protection.